﻿using System;
using System.Collections.Generic;
using System.Configuration;
using System.Linq;
using System.Web;

namespace Fengsoft.AIBlog.Web.Code
{
    public static class SessionHelper
    {
        private const string isAdminName="Fengsoft.AIBlog.Web.Code.SessionHelper.isAdminName";
        public static bool IsAdmin
        {
            get
            {
                bool result=false;
                if (HttpContext.Current.Session[isAdminName]!=null)
                {
                    result=Convert.ToBoolean(HttpContext.Current.Session[isAdminName]);
                }
                return result;
            }
            set
            {
                HttpContext.Current.Session[isAdminName]=value;
            }
        }
    }
}